<!DOCTYPE html>
<html>

<head>
    <title>视频播放示例</title>
</head>

<body>
    <video id="video" controls>
        <source src="https://www.apple.com/newsroom/videos/vision-pro-visionos/large_2x.mp4" type="video/mp4">
        Your browser does not support HTML5 video.
    </video>

    <script>
        var video = document.getElementById('video');

        // 鼠标移动到视频时播放
        video.addEventListener('mouseover', function () {
            video.play();
        });

        // 鼠标移出时暂停
        video.addEventListener('mouseout', function () {
            video.pause();
        });
    </script>
</body>

</html>